import request from "@/router/axios";

export function getDic(dictKey) {
  return request({
    url: '/bonus/common/admin/dict/'+ dictKey,
    method: 'get',
  })
}


//机构|人员复制方案名称
export function copyScheme(obj) {
  return request({
    url: '/bonus/bonusdeptcompute/copy',
    method: 'post',
    data: obj
  })
}


//机构、人员方案岗位系数调节 -  获取列下拉选
export function getValuesOfColumn(type,computeSubId,dictKey) {
  let url = ''
  if (type == 'jg'){
    url = '/bonus/bonusdeptcomputeratio/getByDictKey/'
  }else{
    url = '/bonus/bonuspersoncomputeratio/getByDictKey/'
  }
  return request({
    url: url + computeSubId + '/' + dictKey,
    method: 'get',
  })
}

//机构、人员方案岗位系数调节 - 保存批量修改的值
export function saveBatchModifyValues(type,data) {
  let url = ''
  if (type == 'jg'){
    url = '/bonus/bonusdeptcomputesub/saveRatioList/'
  }else{
    url = '/bonus/bonuspersoncomputesub/saveRatioList/'
  }
  return request({
    url:url ,
    method: 'post',
    data:data
  })
}
